package com.atguigu.gmall.service;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.product.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

public interface ManagerService  extends IService<BaseAttrValue>  {
    List<BaseCategory1> getCategory1();

    /**
     * 根据一级分类Id 查询二级分类数据
     * @param category1Id
     * @return
     */
    List<BaseCategory2> getCategory2(Long category1Id);

    /**
     * 根据二级分类Id 查询三级分类数据
     * @param category2Id
     * @return
     */
    List<BaseCategory3> getCategory3(Long category2Id);

    public List<BaseAttrInfo> getAttrInfoList(Long category1Id, Long category2Id, Long category3Id);

    void saveAttrInfo(BaseAttrInfo baseAttrInfo);

    BaseAttrInfo getBaseAttrInfo(Long attrId);

    IPage<SpuInfo> getSpuInfoPage(Page<SpuInfo> spuInfoPage, SpuInfo spuInfo);

    List<BaseSaleAttr> getBaseSaleAttrList();

    Result saveSpuInfo(SpuInfo spuInfo);

    Result getSpuInfo(Long spuId);

    Result updateSpuInfo(SpuInfo spuInfo);

    Result getSpuSaleAttrList(Long spuId);

    Result getSpuImageList(Long spuId);

    void saveSkuInfo(SkuInfo skuInfo);
    Result list(Page<SkuInfo> spuInfoPage,Long category3Id);

    Result getSkuInfo(Long skuId);

    Result onSale(Long skuId);

    Result cancelSale(Long skuId);
}
